package com.itheima.demo.Demo06;

public class Runable implements Runnable {
    @Override
    public void run() {
        String name = Thread.currentThread().getName();
        System.out.println("线程名字");

        for (int i = 0; i <=30 ; i++) {
            System.out.println("孙悟空"+" "+i);
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
    }
}
